package com.cf.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.cf.domain.pojo.Judges;
import com.cf.domain.pojo.ScoreOptions;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author lzqinga@126.com
 * @Date 2024/11/9  10:48
 */
public interface ScoreOptionsMapper extends BaseMapper<ScoreOptions> {

    @Select("SELECT id, type, code, name, parent_code,score FROM t_score_options WHERE enable = 0")
    Page<ScoreOptions> selectList(Page<ScoreOptions> page, QueryWrapper<ScoreOptions> queryWrapper);

    @Select("SELECT id, type, code, name, parent_code, score, level, introduce FROM t_score_options ${ew.customSqlSegment}")
    List<ScoreOptions> listByType(@Param(Constants.WRAPPER) QueryWrapper<ScoreOptions> queryWrapper);
}
